Electronic content, such as web pages, can include any type of media that can be displayed on mobile and other computing devices. Computing devices include devices such as desktop computers, laptop computers, smart phones, tablet computers, personal digital assistants, etc. Operations changing the display of electronic content rendered at a computing device can include, for example, magnifying a portion of the electronic content via zooming or changing the horizontal or vertical position of the content on a display screen.
Viewer applications can include zooming and panning operations expressed as operations changing some attribute of the physical pixels used to display electronic content. Zooming can include, for example, a viewer application selecting a portion of an image comprised of a group of pixels and magnifying that group of pixels such that a portion of the display is occupied only by that group of pixels. Panning can include, for example, a viewer application moving an image by a certain number of pixels in a given direction. Accordingly, a viewer application manipulating a portion of an image displayed on differing display devices may require that the viewer application use different zooming and panning operations for different display devices with different screen resolutions. For example, moving content halfway across the screen on a display device with a resolution of 1000 pixels×500 pixels may involve a lateral movement of 500 pixels, while the same movement on a display device with a resolution of 500 pixels×250 pixels may involve a lateral movement of 250 pixels.
Changing the display of electronic content based on physical pixels can therefore require modifying viewer application operations such as zooming and panning to specifically account for the resolution of the display device. Such device-specific modifications can decrease the performance of a viewer application designed for a range of computing devices. For example, a viewer application would require different operations when rendering content at a desktop computer with a monitor versus rendering content on a smart phone.